home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
VGANIM10.ARJ
/
README.DOC
< prev
next >
Wrap
Text File
|
1992-08-29
|
17KB
|
592 lines
VGA Animate
Animation Library
Version 1.0
Copyright 1992, Nexus Software.
VGA Animate was used to create VA_DEMO.EXE.
VGA Animate is offered by Nexus Software as shareware, on a
royalty-free basis.
If you find this library useful or would like to produce
programs with graphics like VA_DEMO.EXE, order a registered
copy of the package from:
Nexus Software
P.O. Box 341126
Milwaukee, WI 53234-1126
(414) 321-6792
Send $39.00 for a registered copy. You'll receive:
-- The complete library of over 100 functions, without
"guilt messages;"
-- A complete set of external fonts and a font editor;
-- A complete, cross-referenced manual;
-- A handy quick reference guide to the tools;
-- A FREE first upgrade;
-- A FREE Beta copy of our next package!
All for only $39.00!
Send an additional $30.00 and we will send you the complete
source code, written in C and Assembler.
Even if you choose not to register your copy, please send any
comments, suggestions, stories of success and/or failure to
the address listed above. We need your valuable input in
order to improve the package.
Please remember, we are making this package available to you
on a shareware basis - feel free to distribute copies to your
colleagues, but you may not prepare applications using these
tools without first registering your software.
1. INTRODUCTION
VGA Animate is a graphics library which provides a complete
set of functions for accessing the undocumented VGA Animation
Mode (often referred to as "MODE X").
This mode features:
- 320x240 Resolution
- 256 Simultaneous on-screen colors
- 3 Displayable pages
- Video storage for animation images
The tools provided in this package allow you to perform true
animation techniques through sophisticated page swapping using
the extra pages provided. This mode is available to any standard
VGA card with 256K or more memory.
This package is based in part on information published by
Michael Abrash in Dr. Dobb's Journal.
For further reference, read:
-- "Mode X: 256-Color VGA Magic," Michael Abrash,
Dr. Dobb's Journal, July 1991;
-- "More Undocumented 256-Color VGA Magic," Michael Abrash,
Dr. Dobb's Journal, August 1991;
-- "256-Color VGA Animation," Michael Abrash,
Dr. Dobb's Journal, September 1991.
VGA Animate includes functions for PCX file support, mouse support,
sound support, and special effects. External character fonts and
a font editor are also provided if you purchase a registered copy.
VA_DEMO.FNT is an example of an external font file. If a
registered copy is purchased, many external font files are provided.
VGA Animate supports the following C programming packages:
- Microsoft C compiler (link VA_M.LIB into your program)
- Borland Turbo C compiler (link VA_B.LIB into your program)
- Borland C compiler. (link VA_B.LIB into your program)
VGA_ANIM.H should be included in all source files that use library
functions.
System Requirements:
- 8086 or 80X86 IBM or IBM compatible computer system.
- A standard VGA video board with minimum memory of at
least 256K.
- A VGA-compatible monitor
2. FUNCTION LISTINGS
The following pages describe each function in the library. These pages
contain the function prototypes and the arguments to each
function (if any). The manual provides complete descriptions,
examples, and a helpful cross reference for each function.
void adjust_mouse_click(unsigned int ticks);
unsigned int ticks Clock ticks per click
int arc(int x,int y,int radius,int start_deg,int end_deg,unsigned char color);
int x,int y Arc center
int radius Arc radius
int start_deg Counter-clockwise start degree
int end_deg Counter-clockwise stop degree
unsigned char color Arc color
long block_size(int x1,int y1,int x2,int y2);
int x1,int y1 Upper left block coordinates
int x2,int y2 Lower right block coordinates
int circle(int x,int y,int radius,unsigned char color,char type);
int x,int y Circle center
int radius Circle radius
unsigned char color Circle color
char type FILL or EMPTY
void cls(unsigned char color);
unsigned char color Clear screen color
int copy_block(char source_page,int source_x1,int source_y1,
int source_x2,int source_y2,
char dest_page,int dest_x,int dest_y);
char source_page PAGE1, PAGE2, or PAGE3
int source_x1,int source_y1 Upper left block coordinates
int source_x2,int source_y2 Lower right block coordinates
char dest_page PAGE1, PAGE2, or PAGE3
int dest_x,int dest_y Upper right block coordinates
int copy_page(char source_page,char dest_page);
char source_page PAGE1, PAGE2, or PAGE3
char dest_page PAGE1, PAGE2, or PAGE3
void default_mouse_cursor(void);
void delay_seconds(unsigned int seconds);
unsigned int seconds Program pause seconds
void delay_ticks(unsigned int ticks);
unsigned int ticks Program pause ticks (18 ticks per second)
void disintegrate_screen(unsigned char color,unsigned int clear_time);
unsigned char color Disintegrate color
unsigned int clear_time Disintegrate time in ticks
int erase_image(IMAGE *image,char background_page,char page,int x,int y);
IMAGE *image Image to erase
char background_page PAGE1, PAGE2, or PAGE3
char page PAGE1, PAGE2, or PAGE3
int x,int y Upper left image coordinates
void fade_screen(unsigned char fade_color,unsigned int fade_time);
unsigned char fade_color Fade color
unsigned int fade_time Fade time in ticks
int fastfill(int x,int y,unsigned char color,unsigned char border);
int x,int y coordinates of fastfill
unsigned char color Fill color
unsigned char border Fill border
void free_expanded_image_space(void);
int free_font(char font);
char font NORMAL_FONT, SMALL_FONT, USER_FONT1 - USER_FONT5
void free_image(IMAGE *image);
IMAGE *image Image to free
void free_image_space(void);
unsigned char getcolor(int x,int y);
int x,int y coordinates to get color at
int getmaxx(void);
int getmaxy(void);
int getx(void);
int gety(void);
int get_block(char page,int x1,int y1,int x2,int y2,char *block);
char page PAGE1, PAGE2, or PAGE3
int x1,int y1 Upper left block coordinates
int x2,int y2 Lower right block coordinates
char *block Block buffer
unsigned int get_clock(void);
char get_draw_page(void);
IMAGE *get_image(char page,int source_x1,int source_y1,
int source_x2,int source_y2);
char page PAGE1, PAGE2, or PAGE3
int source_x1,int source_y1 Upper left image coordinates
int source_x2,int source_y2 Lower right image coordinates
struct mouse_coord get_left_press(void);
struct mouse_coord get_left_release(void);
struct mouse_coord get_middle_press(void);
struct mouse_coord get_middle_release(void);
struct mouse_button get_mouse_click(void);
struct mouse_coord get_mouse_coord(void);
struct mouse_button get_mouse_dclick(void);
struct mouse_button get_mouse_press(void);
struct mouse_button get_mouse_release(void);
void get_palette(char far *palette);
char far *palette Pointer to palette buffer
void get_palette_element(unsigned char color,char far *red,char
far *green,char far *blue);
unsigned char color Color to retrieve RGB info for
char far *red Pointer to store red level char
far *green Pointer to store green level char
far *blue Point to store blue level
struct mouse_coord get_right_press(void);
struct mouse_coord get_right_release(void);
struct text_settings get_text_settings(void);
int get_transparent_color(void);
int get_video_error(void);
void hide_mouse(void);
unsigned int image_size(int source_x1,int source_y1,
int source_x2,int source_y2);
int source_x1,int source_y1 Upper left image coordinates
int source_x2,int source_y2 Lower right image coordinates
unsigned int image_space_left(void);
char init_mouse(void);
char is_font_loaded(char font);
char font NORMAL_FONT, SMALL_FONT, USER_FONT1 - USER_FONT5
char is_mouse_click(void);
char is_mouse_dclick(void);
char is_mouse_press(void);
char is_mouse_release(void);
char is_mouse_visible(void);
char is_valid_coord(int x,int y);
int x,int y coordinates to test
int line(int x1,int y1,int x2,int y2,unsigned char color);
int x1,int y1 Line coordinates 1
int x2,int y2 Line coordinates 2
unsigned char color Line color
int linerel(int x_offset,int y_offset,unsigned char color);
int x_offset,int y_offset Offset to draw line
unsigned char color Line color
int lineto(int x,int y,unsigned char color);
int x,int y coordinates to draw line to
unsigned char color Line color
int load_block(char page,int x,int y,char *filename);
char page PAGE1, PAGE2, or PAGE3
int x, int y Upper left block coordinates
char *filename Block filename
int load_font(char font,char *fontfile);
char font USER_FONT1 - USER_FONT5
char *fontfile External font file
int load_palette(char *filename);
char *filename Palette file
int load_pcx_screen(char page,char *filename,char load_palette);
char page PAGE1, PAGE2, or PAGE3
char *filename 256 color PCX file
char load_palette TRUE or FALSE
int load_screen(char page,char *filename);
char page PAGE1, PAGE2, or PAGE3
char *filename Screen file
int moverel(int x_offset,int y_offset);
int x_offset,int y_offset Offset to move
int moveto(int x,int y);
int x,int y coordinates to move to
void move_block(char page, int source_x1,int source_y1,
int source_x2,int source_y2,int dest_x,int dest_y);
char page PAGE1, PAGE2, or PAGE3
int source_x1,int source_y1 Upper left block coordinates
int source_x2,int source_y2 Lower right block coordinates
int dest_x,int dest_y Upper left block coordinates
int paint(int x,int y,unsigned char color,unsigned char border);
int x,int y Paint coordinates
unsigned char color Paint color
unsigned char border Paint border
void play_sound(unsigned int freq,unsigned int duration);
unsigned int freq Sound frequency
unsigned int duration Sound duration in ticks
int point(int x,int y,unsigned char color);
int x,int y Point coordinates
unsigned char color Point color
int print_text(int x,int y,char *text);
int x,int y Text coordinates
char *text Text to print
int put_block(char page,int x,int y,char *block);
char page PAGE1, PAGE2, or PAGE3
int x,int y Block coordinates
char *block Block buffer
int put_image(IMAGE *image,char page,int dest_x,int dest_y);
IMAGE *image Image to draw
char page PAGE1, PAGE2, or PAGE3
int dest_x,int dest_y Upper left image coordinates
int rectangle(int x1,int y1,int x2,int y2,unsigned char color,char type);
int x1,int y1 Upper left rectangle coordinates
int x2,int y2 Lower right rectangle coordinates
unsigned char color Rectangle color
char type EMPTY or FILL
void reset_mouse(void);
int save_block(char page,int x1,int y1,int x2,int y2,char *filename);
char page PAGE1, PAGE2, or PAGE3
int x1,int y1 Upper left block coordinates
int x2,int y2 Lower right block coordinates
char *filename Block file
int save_palette(char *filename);
char *filename Palette file
int save_pcx_screen(char page,char *filename);
char page PAGE1, PAGE2, or PAGE3
char *filename PCX file
int save_screen(char page,char *filename);
char page PAGE1, PAGE2, or PAGE3
char *filename Screen file
int set_current_font(char font);
char font NORMAL_FONT, SMALL_FONT, USER_FONT1 - USER_FONT5
int set_draw_page(char page);
char page PAGE1, PAGE2, or PAGE3
void set_mouse_cursor(char *cursor,char *mask);
char *cursor Cursor definition array
char *mask Mask definition array
int set_mouse_page(char page);
char page PAGE1, PAGE2, or PAGE3
int set_mouse_pos(int x,int y);
int x,int y Mouse coordinates
void set_palette(char far *palette, char speed);
char far *palette Palette buffer
char speed SLOW_PAL or FAST_PAL
void set_palette_element(unsigned char color,char red,char
green,char blue);
unsigned char color Color index
char red Red intensity
char green Green intensity
char blue Blue intensity
int set_text_alignment(char alignment);
char alignment TOP_ALIGNMENT, BOTTOM_ALIGNMENT, BASELINE_ALIGNMENT
void set_text_bgcolor(unsigned char bg_color);
unsigned char bg_color Background color
void set_text_color(unsigned char fg_color,unsigned char bg_color);
unsigned char fg_color Foreground color
unsigned char bg_color Background color
int set_text_direction(char direction);
char direction LEFT_RIGHT, UP_DOWN
void set_text_fgcolor(unsigned char fg_color);
unsigned char fg_color Foreground color
void set_text_bgcolor(unsigned char bg_color);
unsigned char bg_color Background color
void set_text_color(unsigned char fg_color,unsigned char bg_color);
unsigned char fg_color Foreground color
unsigned char bg_color Background color
int set_text_direction(char direction);
char direction LEFT_RIGHT, UP_DOWN
void set_text_fgcolor(unsigned char fg_color);
unsigned char fg_color For;
int x,int y Text coordinates
char *text Text to print
int x_offset,int y_offset Offset of shadow
unsigned char shadow_color Shadow color
void show_mouse(void);
void show_page(char page);
char page PAGE1, PAGE2, or PAGE3
void shrink_screen(unsigned char color,
unsigned int xshrink,unsigned int yshrink);
unsigned char color Replacement color
unsigned int xshrink Horizontal reduction factor
unsigned int yshrink Vertical reduction factor
void sound_off(void);
void sound_on(unsigned int freq);
unsigned int freq Frequency of sound
void text_mode(void);
int text_baseline(void);
int text_char(int x,int y,unsigned char ch);
int x,int y Text coordinates
unsigned char ch Character to print
unsigned char text_end_char(void);
int text_height(void);
unsigned char text_start_char(void);
int text_width(void);
void transparent_on(void);
void transparent_off(void);
char *video_error_msg(int error);
int error Error number
void video_mode(void);
MICROSOFT is a registered trademark of Microsoft Corporation.
BORLAND is a registered trademark of Borland International.